Skip to content

feat(cli): show the record key in aimdb record list - #501

Merged
lxsaah merged 4 commits into
mainfrom
fix/record-list
Nov 25, 2026
Merged

lxsaah merged 4 commits into
mainfrom
fix/record-list

Conversation

@lxsaah

@lxsaah lxsaah commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Description

aimdb record list now shows a Key column first, so the table shows the key to pass to aimdb record get / set and aimdb watch. The Name column (the Rust type name) stays next to it, as the issue asks.

  • tools/aimdb-cli/src/output/table.rs: adds the Key header and record.record_key to each row, and updates the two table snapshot tests.
  • tools/aimdb-cli/README.md: updates the example output and says what Key and Name mean.
  • tools/aimdb-cli/CHANGELOG.md: adds an Unreleased entry.

JSON output doesn't change, because RecordMetadata already serializes record_key.

Follow-up fixes after #500

This PR also tidies up after the typed_api / typed_record split (#500). I merged main to get #500's files. None of these changes behaviour.

Fixes:

  • typed_api/mod.rs: two bullets in the Input docs had been joined onto one line. I restored the line break, and rustdoc now renders them as two list items.
  • typed_api/link_inbound.rs: removes the leftover empty #[cfg(test)] mod tests {}.

Cleanups:

  • typed_record/record.rs: renames set_consumers_profiling to set_consumer_profiling, since it handles a single consumer.
  • typed_record/mod.rs → typed_record/tests.rs: moves the inline tests into their own file, as typed_api/tests/ and session/client/tests.rs already do. The moved code changes only where rustfmt reflowed it.
  • typed_api/registrar.rs: removes #[allow(unused_mut)] from the outbound-link consumer factory. A link_consumer helper with an observability variant and a no-op variant replaces it. Without observability, a NoLinkMetrics marker takes the place of the stage metrics, which avoids a clippy let_unit_value warning.
  • typed_record/mod.rs: narrows ConsumerServiceFn / ProducerServiceFn from pub(super) to pub(in crate::typed_record).

Related Issue

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the project's coding standards.
  • I have added tests to cover my changes. (I updated the existing table snapshot tests.)
  • All new and existing tests passed (make check). I didn't run the full make check. I ran these instead, and all passed:
    • cargo fmt --all -- --check
    • cargo clippy -p aimdb-core --all-targets --no-default-features --features … with -D warnings, for the feature sets alloc, alloc,observability, alloc,remote and std,tracing,observability
    • cargo test -p aimdb-core --no-default-features --features … for std,tracing,observability (320 lib tests), alloc (136) and alloc,remote (163)
    • cargo test -p aimdb-data-contracts; the trybuild snapshots didn't need regenerating
    • cargo test -p aimdb-cli, plus clippy for that crate
    • cargo doc -p aimdb-core --no-deps; the Input bullet list renders correctly
  • I have updated the documentation accordingly.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGkDJAA2rC3Yn2KLShtuvP

Add a Key column as the first column of the record list table, so the
list shows what to pass to aimdb record get / set and aimdb watch. The
Name column (the Rust type name) stays beside it.

Closes #455

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGkDJAA2rC3Yn2KLShtuvP
Restore the line break between the two bullets in the Input docs, so
rustdoc renders them as separate list items, and drop the empty test
module left in typed_api/link_inbound.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGkDJAA2rC3Yn2KLShtuvP
- Rename TypedRecord::set_consumers_profiling to set_consumer_profiling;
  it attaches profiling to a single consumer.
- Move typed_record's inline tests into typed_record/tests.rs, as
  typed_api/tests/ and session/client/tests.rs already do.
- Replace the #[allow(unused_mut)] in the outbound-link consumer factory
  with a link_consumer helper that has an observability variant and a
  no-op variant.
- Narrow ConsumerServiceFn / ProducerServiceFn from pub(super) to
  pub(in crate::typed_record).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGkDJAA2rC3Yn2KLShtuvP
@lxsaah
lxsaah merged commit 5038d99 into main Nov 25, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] aimdb record list: show each record key

2 participants